<template>
	<view class="order">
		<view class="search">
			<view class="input">
				<input type="text" v-model="order_no" placeholder="请输入淘宝订单号" />
			</view>
			<view class="btn" @tap='search()'>提交订单</view>
		</view>
		
		<view class="tips">如果你的订单未找到，请把淘宝订单号复制到此匹配</view>
	</view>
</template>

<script>
	import Request from '../../common/request.js';
	
	export default {
		data() {
			return {
				order_no: ''
			};
		},
		methods: {
			//获取订单列表
			search: function(){
				var order_no = this.order_no;
				if(!order_no){
					Request.alert('请输入淘宝订单号');return;
				}
				var that = this;
				var url =  'tbk/pregOrder';
				Request.send({
					url: url,
					data: {order_no: that.order_no},
					sCallback: function(res) {
						Request.alert(res.msg)
					}
				});
			}
		}
	}
</script>

<style>
	page{
		background: #fff;
	}

	.search{
		margin: 60upx 0;
		display: flex;
		flex-direction: row;
		height: 90upx;
		align-items: center;
		padding: 0 20upx;
	}

	.search .input{
		flex: 1;
		display: flex;
		align-items: center;
	}

	.search .input input{
		flex: 1;
		border: 1upx solid #3385ff;
		border-radius: 4upx 0 0 4upx;
		margin: 0;
		padding: 0 20upx;
		height: 80upx;
	}

	.search .btn{
		background: #3385ff;
		color: #fff;
		width: 200upx;
		border-radius: 0 4upx 4upx 0;
		border: 1upx solid #3385ff;
		height: 80upx;
		align-items: center;
		display: flex;
		justify-content: center;
	}

	.tips{
		background: #fff;
		color: #999;
		padding: 0 10px;
		text-align: center;
	}
</style>
